package com.fu.web.serviceImplments;

import com.fu.web.entity.departments;
import com.fu.web.mapper.departmentsMapper;
import com.fu.web.mapper.doctorMapper;
import com.fu.web.service.testService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class testServiceImpl implements testService {
    @Autowired
    private doctorMapper doctorMapper;
    @Autowired
    private departmentsMapper deparementsMapper;

    @Override
    public void showAlldepart() {
        List<departments> list=new ArrayList<departments>();
        departments deparnts=null;
        deparnts= deparementsMapper.selectByPrimaryKey("1");
        System.out.println(deparnts.toString());
        list=deparementsMapper.selectAll();
        for (departments departments : list) {
            System.out.println(departments.getDepartmentName());
        }

    }

    @Override
    public void getDocById() {

    }
}
